import { post, put, get } from '@/utils/hettpUtils/httpRequest'

export const orgColumns = [
    {
        title: "名称",
        dataIndex: "name",
    },
    {
        title: "简称",
        dataIndex: "abbreviationName",
    },
    {
        title: "编码",
        dataIndex: "code",
    },
    {
        align: 'center',
        title: "负责人",
        dataIndex: "adminUserName",
    },
    {
        title: "办公地址",
        dataIndex: "officeAddress",
    },
    {
        align: 'center',
        title: "创建时间",
        dataIndex: "createTime",
        sorter: true,
    },
    {
        align: 'center',
        title: "状态",
        dataIndex: "status",
        scopedSlots: { customRender: "status" },
    },
    {
        align: 'center',
        width:'160px',
        title: "操作",
        dataIndex: "action",
        scopedSlots: { customRender: "action" },
    },
];
 
export const addOrg = (parameter) => post('api/sysOrganize/addOrg', parameter)
export const deleteOrg = (parameter) => post('api/sysOrganize/deleteOrg', parameter)
export const updateOrg = (parameter) => put('api/sysOrganize/updateOrg', parameter)
export const queryOrg = (parameter) => get('api/sysOrganize/queryOrg', parameter)
export const getOrg = (parameter) => get('api/sysOrganize/getOrg', parameter)
export const queryOrgTreeSelect = (parameter) => post('api/sysOrganize/queryOrgTreeSelect', parameter)
export const queryOrgTree = (parameter) => get('api/sysOrganize/queryOrgTree', parameter)
